home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFUNCS / FRMVPRTF.C < prev    next >
C/C++ Source or Header  |  1993-02-01  |  926b  |  38 lines

  1. /**************************************************************************
  2.  * FRMVPRTF.C - frm_vprintf() function.
  3.  *************************************************************************/
  4.  
  5. #include "gemfintl.h"
  6. #include <string.h>
  7.  
  8. char    *_Frmaddmsg = NULL;     /* hook for frm_error() to add a message */
  9.  
  10. /**************************************************************************
  11.  *
  12.  *************************************************************************/
  13.  
  14. short frm_vprintf(options, buttons, fmt, args)
  15.     long            options;
  16.     register char    *buttons;
  17.     register char    *fmt;
  18.     va_list         args;
  19. {
  20.     short    status;
  21.     short    position;
  22.     char    *msgbuf;
  23.  
  24.     msgbuf = _FrmVFormat(fmt, args, &position);
  25.  
  26.     if (_Frmaddmsg != NULL && position != -1) {
  27.         strcpy(&msgbuf[position], _Frmaddmsg);
  28.         _Frmaddmsg = NULL;
  29.     }
  30.  
  31.     status = frm_nldialog(options, buttons, msgbuf);
  32.  
  33.     _FrmVFree(msgbuf);
  34.  
  35.     return status;
  36. }
  37.  
  38.